input, select {
    border: 1px solid #bfbfbf;
    border-radius: 2px;
    box-sizing: border-box;
    color: #444;
    font: inherit;
    padding: 3px;
    outline: none;
    display: inline-block;
}

input:focus, select:focus {
    -webkit-transition: border-color 200ms;
    border-color: rgb(77, 144, 254);
    outline: none;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 100%;
}

a {
    color: rgb(17, 85, 204);
    cursor: pointer;
    outline: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    -webkit-user-select: none;
}

header {
    padding: 0 12px;
    align-items: center;
    display: flex;
}

header h1 {
    font-size: 1.5em;
    font-weight: normal;
    line-height: 1;
    margin: 15px 0;
    display: inline-block;
    flex: 1;
    white-space: nowrap;
}

button {
    -webkit-appearance: none;
    -webkit-user-select: none;
    border: 1px solid #bfbfbf;
    background-color: #eee;
    border-radius: 2px;
    color: #444;
    font: inherit;
    padding: 3px 10px;
    outline: none;
    margin-left: 10px;
    cursor: pointer;
}

button:hover, button:focus {
    color: black;
}

.loading {
    margin-top: 20px;
    background-image: url(throbber.svg);
    height: 16px;
    width: 16px;
}

#search {
    flex: none;
    min-width: 300px;
}

#history-summary {
    background-color: rgb(235, 239, 249);
    border-top: 1px solid rgb(156, 194, 239);
    padding: 5px 10px;
    white-space: nowrap;
    display: flex;
    height: 23px;
}

#history-summary-separator {
    flex: none;
    width: 290px;
}

#history-summary-text {
    flex: 1;
}

#history-summary-label,
#history-summary-search,
#history-summary-clear {
    display: none;
}

#history-summary-search {
    font-weight: bold;
}

#history-clear-all {
    flex: none;
    -webkit-user-select: none;
}

.remove-single {
    -webkit-user-select: none;
    padding-right: 10px;
}

.remove-single:hover {
    text-decoration: none;
}

#main .sidebar {
    padding: 20px;
    width: 282px;
}

#container {
    position: absolute;
    bottom: 0;
    left: 300px;
    right: 0;
    top: 71px;
    overflow: auto;
    padding-bottom: 20px;
}

#container h2 {
    margin: 20px 0;
}

#container .row {
    display: block;
    white-space: nowrap;
}

#container .row .remove-single,
#container .row .date,
#container .row .link,
#container .row.empty span {
    display: inline-block;
    line-height: 2;
    vertical-align: middle;
}

#container .row .date {
    width: 50px;
}

#main .sidebar .copy {
    position: absolute;
    bottom: 20px;
    width: 240px;
    background: url(logo2.gif) center left no-repeat;
    padding-left: 60px;
    height: 40px;
    line-height: 20px;
    -webkit-user-select: none;
}

#container .row .link {
    max-width: 700px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 16px;
    padding-left: 26px;
    margin-left: 10px;
}

#datepicker-today {
    display: block;
    margin-top: 10px;
    text-align: center;
    -webkit-user-select: none;
}

body.popup {
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
}

body.popup h1 {
    margin: 0 15px;
    font-size: 1.3em;
    padding: 15px 0 0 0;
}

body.popup #container {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    padding: 10px 15px;
    margin: 0;
}

body.popup .entry h2 {
    display: none;
}

body.popup #container .row .link {
    max-width: 400px;
}

body.popup #view-full-history {
    display: block;
    padding: 10px 0;
    text-align: center;
    font-weight: bold;
    border-top: 1px solid #ddd;
    margin: 0 15px;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #333333;
        color: #aaaaaa;
    }

    a {
        color: #6090b6;
    }

    h1, h2, h3 {
        color: #ffffff;
    }

    #history-summary {
        background-color: #2b2b2b;
    }

    #history-summary,
    body.popup #view-full-history {
        border-color: #3b3b3b;
    }

    input, select {
        background-color: #2b2b2b;
        border-color: #3b3b3b;
        color: #aaaaaa;
    }

    input:focus, select:focus {
        border-color: #6a6a6a;
    }

    button {
        background-color: #2b2b2b;
        border: 1px solid #3b3b3b;
        border-radius: 2px;
        color: #6a6a6a;
        font: inherit;
        padding: 3px 10px;
        outline: none;
    }

    button:hover, button:focus {
        background-color: #222;
        border-color: #6a6a6a;
        color: #aaaaaa;
        outline: none;
    }
}
